package m10;

import static org.junit.Assert.*;

import org.junit.Test;

import m08.MapPanel;
import m07.GamePanel;

public class MapPanelTest {
	
	private GamePanel gpanel = new GamePanel();
	private MapPanel map = new MapPanel(gpanel);
	
	@Test
	public void marketTest() {
		map.choice.setSelectedIndex(1);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Industrial"));
		map.choice.setSelectedIndex(2);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Agriculture"));
		map.choice.setSelectedIndex(3);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Early Industrial"));
		map.choice.setSelectedIndex(4);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Post Industrial"));
		map.choice.setSelectedIndex(5);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Pre-Agriculture"));
		map.choice.setSelectedIndex(6);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Renaissance"));
		map.choice.setSelectedIndex(7);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Hi-Tech"));
		map.choice.setSelectedIndex(8);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Agriculture"));
		map.choice.setSelectedIndex(9);
		assertTrue((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Medieval"));
		map.choice.setSelectedIndex(2);
		assertFalse((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Renaissance"));
		map.choice.setSelectedIndex(7);
		assertFalse((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals("Hello World"));
		map.choice.setSelectedIndex(3);
		assertFalse((map.sysChooser(map.choice.getSelectedIndex()).getTechLevel()).equals(""));
	}
	
}